package com.javastudy.w2;

import com.javastudy.w2.model.ResponseModel;
import com.javastudy.w2.tools.OkHttpUtils;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class W2Application {

    public static void main(String[] args) {
        String url="http://localhost:8081";
        ResponseModel responseModel=OkHttpUtils.get(url);
        if(responseModel.isSuccess())
        {
            System.out.println(responseModel.getResponseContent());
        }else{
            System.out.println(responseModel.getMessage());
        }
        SpringApplication.run(W2Application.class, args);
    }

}
